<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0" name="viewport">
    <link href="../static/css/模板2.css" rel="stylesheet">
    <title>{{ job_intention or "简历" }}</title>
</head>
<body>
<div class="container">
    <!-- 照片区域 -->
    {% if personal_info.photo %}
    <div class="profile-pic">
            <img alt="个人照片" src="{{ personal_info.face or '../封面.jpg' }}">
    </div>
    {% endif %}

    <h1>{{ name or "匿名" }}</h1>
    {% if education.school %}
    <p>{{ education.school }} | {{ education.major }} | 预计毕业：{{ education.end_date }}</p>
    {% endif %}
    {% if personal_info.e_mail and personal_info.contact %}
    <p>📧 {{ personal_info.e_mail }} | 📱 {{ personal_info.contact }}</p>
    {% endif %}

    {% if education.school %}
    <h2>教育背景</h2>
    <p><strong>{{ education.school }} {{ education.major }} | {{ education.degree }}</strong></p>
    <p>GPA：{{ education.gpa }} | 预计毕业时间：{{ education.end_date }}</p>
    {% if education.courses %}
        <div>核心课程：</div>
        <div>{{ education.courses }}</div>
    {% endif %}
    {% endif %}

    {% if skills.programming_languages or skills.tools %}
    <h2>技能清单</h2>
        <div><strong>技术栈</strong>：</div>
        <div>{{ skills.programming_languages }} | {{ skills.tools }}</div>
    {% if skills.frameworks or skills.databases %}
    <div class="skill-item">
        <div><strong>学习中</strong>：</div>
        <div>{{ skills.frameworks }} | {{ skills.databases }}</div>
    </div>
    {% endif %}
    {% endif %}

    {% if work_experience %}
    <h2>实践经历</h2>
    {% for experience in work_experience %}
    <div class="experience">
        <h3>{{ experience.position }} @ {{ experience.company_name }}</h3>
        <p>{{ experience.start_date }} - {{ experience.end_date }}</p>
        {% for desc in experience.description %}
        <p>- {{ desc }}</p>
        {% endfor %}
    </div>
    {% endfor %}
    {% endif %}

    {% if project_experience %}
    <h2>项目经历</h2>
    {% for project in project_experience %}
    <div class="project">
        <h3>{{ project.project_name }}</h3>
        <p><strong>技术栈</strong>：{{ project.tech_stack | join(" | ") }}</p>
        {% for result in project.results %}
        <p>- {{ result }}</p>
        {% endfor %}
    </div>
    {% endfor %}
    {% endif %}

    {% if certificates %}
    <h2>技术认证</h2>
    <p>
        {% for cert in certificates %}
        ✅ {{ cert.certificate_name }}（{{ cert.issuing_authority }}）{% if not loop.last %} | {% endif %}
        {% endfor %}
    </p>
    {% endif %}

    {% if self_evaluation.description or self_evaluation.strengths %}
    <h2>自我评价</h2>
    {% if self_evaluation.description %}
    <p>{{ self_evaluation.description | join("；") }}</p>
    {% endif %}
    {% if self_evaluation.strengths %}
    <ul>
        {% for strength in self_evaluation.strengths %}
        <li>{{ strength }}</li>
        {% endfor %}
    </ul>
    {% endif %}
    {% endif %}
</div>
</body>
</html>